package designPattern.behavioralPattern.interpreter;

import java.util.ArrayList;

/**
 * @author wei.zhao
 * @description:
 * @date 2021年12月24日 17:50
 */
public class Test {

    public static void main(String[] args) {
        ArrayList<AbstractExpression> expressions = new ArrayList<>();
        expressions.add(new TerminalExpression());
        expressions.add(new NonterminalExpression());
        expressions.add(new TerminalExpression());
        Context context = new Context();
        for (AbstractExpression expression : expressions) {
            expression.interpret(context);
        }

    }
}
